﻿using System;

namespace _024_for循环
{
    class Program
    {
        static void Main(string[] args)
        {
            // 下面的代码将打印前10个斐波那契数（每个数都是前面两个数的和）：
            for (int i = 0, prevFib = 1, curFib = 1; i < 10; i++)
            {
                Console.WriteLine(prevFib);
                int newFib = prevFib + curFib;
                prevFib = curFib;
                curFib = newFib;
            }
            Console.ReadKey();
        }
    }
}
